# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=3

inherit thexgames

DESCRIPTION="This mod enhances overall game performance"
HOMEPAGE="http://www.elite-games.ru/x3/scripts/mods.shtml#tt"
SRC_URI="http://www.elite-games.ru/downloads/x3/scripts/mods/ay/t2/setup_x3-turbo-2_ver2002_r2.7z
	http://www.elite-games.ru/downloads/x3/scripts/mods/ay/t2/path01_x3-turbo-2_ver2002_r2.7z
	extra? ( http://www.elite-games.ru/downloads/x3/scripts/mods/ay/t2/extra_x3-turbo-2_ver2002_r2.7z )"

LICENSE="as-is"
SLOT="0"
KEYWORDS=""
IUSE="extra newfonteng newfontrus nostationdestroy turboplus"

RDEPEND="!games-misc/x3-mod-global-xtm
		!games-misc/x3-mod-global-newworld
		!games-misc/x3-mod-fps-turbomod2-solid"
DEPEND="app-arch/p7zip
	${RDEPEND}"

src_unpack() {
	unpack ${A}

	if use newfonteng
	then
		use newfontrus && die "Only one of newfonteng or newfontrus could be enabled at the same time"
		mv ENG_new_font/Types types
	elif use newfontrus
	then
		mv RUS_new_font/Types types
	fi

	use nostationdestroy && mv NoStationDestroy/*.pck scripts/
	use turboplus && mv Turbo-plus/scripts/* scripts/
}
